import request from "@/router/axios";

// 产品分类tab
export function productGroupList (query) {
    return request({
        url: "/cp/productgroupwechat/list",
        method: "get",
        params: query
    })
}

// 某分类下的产品list
export function productListByGroupId (query) {
    return request({
        url: "/cp/productwechat/page",
        method: "get",
        params: query
    })
}

//金融小店产品发送次数
export function getTackNum(query) {
    return request({
        url: "/cp/productwechat/send",
        method: "get",
        params: query
    });
}
//获取产品经理的信息
export function getProductManager (wxUserId) {
    return request({
        url: "/cp/product-employee-wechat/vo",
        method: "get",
        params:wxUserId
    })
}
//根据分类id获取上架产品列表
export function getGroupList (data) {
    return request({
        url: `cp/productwechat/index`,
        method: "get",
        params:data
    })
}
//自定义产品组样式
export function putProductImg (obj) {
    return request({
        url: `cp/product-employee-wechat/img`,
        method: "put",
        data:obj
    })
}
//改变logo,活动背景图样式
export function getWechatLogo (obj) {
    return request({
        url: `cp/product-employee-wechat/logo`,
        method: "put",
        data:obj
    })
}
// 上传
export function sysFileUpload(obj) {
	return request({
		url: '/admin/sys-file/upload',
		method: 'post',
		// responseType: 'blob',
		data: obj,
		headers: {
			Authorization: "Bearer " + store.getters.access_token,
			LdapToken: store.getters.ldap_token,
			"content-type": "multipart/form-data"
		},
	})
}